home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / doom / newwad14.zip / NEWWAD.TXT < prev    next >
Text File  |  1997-01-13  |  7KB  |  168 lines

  1. NewWad 1.4
  2.  
  3. (originally pcx2wad 0.98 by Daniel Gilliland);
  4. Modified by Christopher Wise
  5.  
  6. NewWad is a program to add textures in pcx, bmp or lbm formats to the WAD2
  7. files that are used by qbsp. NewWad performs averaging to anit-alias the
  8. smaller sized textures.
  9.  
  10.  
  11. Usage:
  12. The command line syntax is:
  13. newwad <scriptfile> <wadfile>
  14.  
  15. <scriptfile> is the full name of the script that newwad reads.
  16. <wadfile> is the full name of the wad file to which the textures are to be
  17. added. If you specify a wad file name that already exists the textures will
  18. be added to the file. Your script file should contain only the new entries if
  19. you are adding to the file.
  20.  
  21. WARNING: MAKE SURE TO BACK UP YOUR WAD FILES AS THIS PROGRAM HAS NOT BEEN
  22. EXTENSIVELY TESTED AND COMES WITH NO GUARANTEE.
  23.  
  24. If the program exits with an error during the script reading process the
  25. original wad file should be untouched. However if there is an error during
  26. the writing procedure the wad file willbe corrupted, so keep a backup copy of
  27. your wad file.
  28.  
  29.  
  30. Scriptfiles:
  31. A script file is just a list of the inupt filenames and the corresponding
  32. texture name that will be included in the wad file. The texture name can be
  33. up to 16 characters long and can include the '*' and '+' characters for
  34. animated textures. There should be one entry per line. Comments are prefixed
  35. by // and can appear after an entry or on a separate line. NewWad supports
  36. pcx/bmp/lbm formats but only with 256 colour images and dimensions that are
  37. a multiple of 16.
  38.  
  39. For example:
  40. ----script.txt-----
  41. tech06_2.pcx    TECH06_2
  42. stairs.lbm      STAIRS
  43. // this is a comment
  44. crate0~1.bmp    CRATE
  45. lava1.pcx       *LAVA1  // this is also a comment 
  46. -------------------
  47.  
  48. Running "newwad script.txt wadfile.wad" would do the following:
  49.  
  50. If a file called wadfile.wad does not exist then a file called 'wadfile.wad'
  51. would be created, and it would contain 4 mip textures: TECH06_2, STAIRS,
  52. CRATE and *LAVA1. Use these names in .map files to specify which texture you
  53. want each face to have.  Also files called palette.lmp and colormap.lmp would
  54. be written to disk. If you are using the quake palette you can ignore/delete
  55. these files.
  56.  
  57. If a file called wadfile.wad exists then the 4 mip textures would be added to
  58. the file. Palette.lmp and colormap.lmp would NOT be created.
  59.  
  60.  
  61. Limitations:
  62. You can't add a picture that is bigger than 1024x512. Since the largest
  63. textures in registered Quake are 320x192 pixels I think that this limit is
  64. more than large enough.
  65.  
  66. The imput image MUST have dimensions that are a multiple of 16 pixels.
  67.  
  68. The program exits if an error is encountered. A valid wad file is only
  69. created if no errors are encountered so you must fix the error in the script
  70. file or source images and rerun the program.
  71.  
  72.  
  73. Notes on Palettes:
  74.  
  75. The quake palette consists of 256 indexed colours, numbered from 0 to 255. 
  76. Colour 255 is used as a transparency colour. Palette entries 224 to 254 are
  77. used as fullbright colours, that is these colours stay the same intensity
  78. regardless of the surrounding light level in the game. In quake they are used
  79. in lights, red sigils etcetera. Color 0 is the transparency colour for sky
  80. textures. Sky textures are a 256x128 bitmap, the left 128x128 portion is the
  81. partially transparent part of the sky (fast-moving, lower clouds), and the
  82. right 128x128 portion is the higher, slow-moving, solid cloud texture.
  83. Palette index 0 is used for transparency.
  84.  
  85. The sub images only use the first 224 colours unless there is a direct match 
  86. to a fullbright colour  or the transparent colour (palette entry 255). 
  87.  
  88. NewWad now uses the palette from each file that is read. Thus it is possible
  89. to create a wad2 file with textures based on another palette for a total
  90. conversion. However, it is still the user's responsibility to ensure that
  91. the palettes of all the input files are all the same.
  92.  
  93. If you are making a total conversion you should put them in the gfx sub-
  94. directory of your game directory. (e.g. make a directory under the Quake
  95. directory called "mygame". Then make a sub-directory called gfx in which you
  96. put the .lmp files. Your levels should go in the quake\mygame\maps directory.
  97. Start quake with the command line quake -game mygame and the modified palette
  98. will be included.  If you are going to change the palette you will need to change the palette
  99. mapping of each of the .lmp, .spr and .mdl files. 
  100.  
  101. To convert the .lmp, .spr and .mdl files I suggest you use swchpal by
  102. Andy Bay.(Look for SWCHPAL.ZIP on ftp.cdrom.com or mirrors)
  103.  
  104. Put all the lump files (except for colormap.lmp and palette.lmp) in a
  105. directory with swchpal.exe. Copy the original palette.lmp as oldpal.pal and
  106. the new palette.lmp as newpal.pal.
  107.  
  108. Make a batch file eg: switch.bat that contains the lines:
  109. -------switch.bat----------------
  110. for %%f in (*.lmp) do swchpal %%f
  111. for %%f in (*.mdl) do swchpal %%f
  112. for %%f in (*.spr) do swchpal %%f
  113. ---------------------------------
  114. (note the double % signs are supposed to be used)
  115.  
  116. All the .lmp files in gfx.wad can be converted at once by the command
  117. swchpal gfx.wad
  118.  
  119.  
  120. WadView and BspView:
  121. The utilities WadView and BspView are included. You can browse an existing
  122. wadfile or bsp file and extract the textures to pcx files.
  123. The command line usage is simple:
  124. wadview <wadfile>
  125. or
  126. bspview <bspfile>
  127.  
  128. <wadfile> and <bspfile> are the full names of the .wad file or .bsp file that
  129. you want to view.
  130.  
  131. WadView will use the pallete lump if there is one in the wad file or the
  132. Quake palette otherwise. BspView always uses the Quake palette. The size of
  133. the image is reduced by a factor of two for large textures; there is now a
  134. size indicator in the top left corner of the screen.
  135.  
  136. Note: WadView and BspView don't run under windows 95 but NewWad still does.
  137.  
  138.  
  139. History:
  140. 0.99 I was going to write a complete utility but then I saw this program and
  141. it's source and thought 'why reinvent the wheel?'. Given that Daniel
  142. Gilliland wrote that he did not intend to update the program I decided to do
  143. it myself. I had already written the decimation routine so I just slotted it
  144. into the source and recompiled.
  145.  
  146. 1.0 I have added the ability to update an existing .wad file as well as 
  147. create a new .wad file. I have also added a rudimentry check on an existing
  148. .wad file to see if it has a directory entry (i.e. is not corrupted) before
  149. attempting to add textures to it.
  150.  
  151. 1.2 Added palette handling to NewWad and the creation of palette.lmp and
  152. colourmap.lmp files. Added WadView and BspView utilities to the distribution.
  153. The ammount of output text has been greatly reduced.
  154.  
  155. 1.3 The method of downsampling was changed to simple averaging.
  156. This is computationally quicker so the program runs much faster and still
  157. produces good results.  This also removes a problem of visual artefacts at
  158. the edge of sub-images that occured with the previous versions.
  159. The maximum image size was increased to 1024x512 pixels.
  160. WadView and BspView now display the sub-images as well as the main image.
  161.  
  162.  
  163. Email:
  164. Contact me (Christopher Wise) at wise@eng2.eng.monash.edu.au
  165. Feel free to ask questions. I would like feedback if the program doesn't work
  166. properly. I will try to fix any bugs, time permitting and may add new features.
  167. I hope that this program is of use to level creators.
  168.